<?php

namespace App\Task\Push;

use App\Helpers\ConfigUtil;
use App\Helpers\ImUtil;
use Hyperf\Crontab\Annotation\Crontab;

/**
 * 定时推送 - 男性唤醒
 * @Crontab(name="MaleWakeupTask", rule="30 17,20,22 * * *", callback="execute", memo="定时推送男性唤醒", singleton=false, enable=true)
 */
class MaleWakeupTask
{
    public function execute()
    {
        log_info(__CLASS__ . "==Start==" . date('Y-m-d H:i:s'));
        ImUtil::sendPushMsgByTag(['male'], ConfigUtil::pickMaleWakeupMsg());
    }
}
